In the field of packet-based networked data communications, there has been recent development towards the use of protocol independent forwarding (PIF) technologies. Using such technologies, routers do not decode the received packet using the protocol in which the packet was encoded, and instead, a router will treat the received packet as a bitstream and will look for an address to forward the traffic to based on a pre-defined bit field location within the bitstream that is specified in a router configuration file. Such routers therefore do not need to understand the protocol used to define the packet format used for the received packet.
Two current implementations of this concept of PIF are referred to as Protocol Oblivious Forwarding (POF) and Programming Protocol-Independent Packet Processors (P4). Routers using POF or P4 treat received packets as a bitstream and obtain routing information based on a series of {offset, length} fields in a configuration file. The offset value determines how far into a bitstream the router should go to access the beginning of the relevant data, and the length indicates the length of the relevant data starting at the offset. This provides a form of protocol abstraction and enables packet forwarding devices to support forwarding of packets that may be defined using a new packet protocol without the forwarding devices having to be reconfigured or reprogrammed to understand that new packet protocol. For example, an {offset, length} field of {96, 32} can be used to designate the source IP address in a data packet.
Data packet encapsulation is a known technique by which one data packet is included within another. For example, a first data packet can be encapsulated within a second data packet (e.g. formatted according to a different protocol) by including the first data packet within the data field of the second data packet.
However, currently there is a lack of capability to encapsulate or decapsulate data using protocol independent routines.
Therefore, in some embodiments there is a need for a method and apparatus for encapsulating and/or decapsulating data packets, incorporating protocol independence, that obviates or mitigates one or more limitations of the prior art.
This background information is provided to reveal information believed by the applicant to be of possible relevance to the present invention. No admission is necessarily intended, nor should be construed, that any of the preceding information constitutes prior art against the present invention.